
require "ttWxCommon"
require "ttWxMenuBar"
require "ttWxToolBar"
require "ttWxDialogNewProject"
require "ttWxMainFrameAui"

class MainFrame < Frame
	def initialize()
		super()
		@globalXrcMainFrame = XmlResource.get();
		@globalXrcMainFrame.init_all_handlers();
		@globalXrcMainFrame.load($globalTTPathRubyResource + "/TTCodeMainFrame.xrc")
		@globalXrcMainFrame.load_frame_subclass(self,nil,"MainFrame")
		$globalMainBarEvt=MainMenuBarEvent.new(self);
		$globalToolBar=MainToolBarMgr.new(self);
		$globalMainFrameAuiMgr=MainFrameAuiMgr.new(self);
		evt_size{ | e | on_size(e) }
	end
	def reloadProject()
		p "reloadProject"
		$globalMainFrameAuiMgr.reloadProject()
		$globalToolBar.reloadProject()
	end
	def on_size(e)
		$globalMainFrameAuiMgr.on_size()
	end
 end
